.class final Lnet/tsapps/topdeals/bd;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private synthetic a:Lnet/tsapps/topdeals/DetailActitivty;


# direct methods
.method constructor <init>(Lnet/tsapps/topdeals/DetailActitivty;)V
    .locals 0

    iput-object p1, p0, Lnet/tsapps/topdeals/bd;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final onClick(Landroid/view/View;)V
    .locals 7

    iget-object v1, p0, Lnet/tsapps/topdeals/bd;->a:Lnet/tsapps/topdeals/DetailActitivty;

    iget-object v0, p0, Lnet/tsapps/topdeals/bd;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->d(Lnet/tsapps/topdeals/DetailActitivty;)Lnet/tsapps/topdeals/objects/Deal;

    move-result-object v2

    new-instance v3, Landroid/content/Intent;

    const-string v0, "android.intent.action.SEND"

    invoke-direct {v3, v0}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v0, "plain/text"

    invoke-virtual {v3, v0}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;

    const-string v0, "android.intent.extra.SUBJECT"

    const-string v4, "Folgendes Angebot k\u00f6nnte dich interessieren"

    invoke-virtual {v3, v0, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    invoke-virtual {v2}, Lnet/tsapps/topdeals/objects/Deal;->b()Z

    move-result v0

    if-eqz v0, :cond_0

    const v0, 0x7f0b0017

    invoke-virtual {v1, v0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->getString(I)Ljava/lang/String;

    move-result-object v0

    :goto_0
    const-string v4, "{name}"

    iget-object v5, v2, Lnet/tsapps/topdeals/objects/Deal;->b:Ljava/lang/String;

    invoke-virtual {v0, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    const-string v4, "{id}"

    iget-wide v5, v2, Lnet/tsapps/topdeals/objects/Deal;->a:J

    invoke-static {v5, v6}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v0, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    const-string v4, "{price}"

    iget-wide v5, v2, Lnet/tsapps/topdeals/objects/Deal;->c:D

    invoke-static {v5, v6}, Ljava/lang/String;->valueOf(D)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v0, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    const-string v4, "{nextprice}"

    iget-wide v5, v2, Lnet/tsapps/topdeals/objects/Deal;->e:D

    invoke-static {v5, v6}, Ljava/lang/String;->valueOf(D)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v0, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    const-string v4, "{saving}"

    invoke-virtual {v2}, Lnet/tsapps/topdeals/objects/Deal;->d()I

    move-result v2

    invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v4, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    const-string v2, "android.intent.extra.TEXT"

    invoke-virtual {v3, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v0, "E-Mail App ausw\u00e4hlen"

    invoke-static {v3, v0}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {v1, v0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->startActivity(Landroid/content/Intent;)V

    return-void

    :cond_0
    const v0, 0x7f0b0016

    invoke-virtual {v1, v0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method
